/*
Navicat SQL Server Data Transfer

Source Server         : LOCALHOST
Source Server Version : 110000
Source Host           : .:1433
Source Database       : AAACHAM2
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 110000
File Encoding         : 65001

Date: 2014-04-24 18:21:06
*/


-- ----------------------------
-- Table structure for tb0005
-- ----------------------------
DROP TABLE [dbo].[tb0005]
GO
CREATE TABLE [dbo].[tb0005] (
[TypeID] varchar(20) NOT NULL ,
[SystemName] nvarchar(100) NULL ,
[UserName] varchar(100) NULL ,
[IsUsed] tinyint NOT NULL DEFAULT ((1)) ,
[UserNameE] varchar(100) NULL ,
[Status] tinyint NOT NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Triggers structure for table tb0005
-- ----------------------------
--DROP TRIGGER [dbo].[AZ0005]
GO
CREATE TRIGGER [dbo].[AZ0005]
ON [dbo].[tb0005]
AFTER UPDATE
AS

Update tb0137 set Description = ins.UserName
From Inserted Ins  inner join tb0137 on tb0137.Code = Ins.TypeID




GO

-- ----------------------------
-- Records of tb0005
-- ----------------------------
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'A01', N'A01 - Mã phân tích 1', N'NV BAÙN HAØNG', N'1', N'', N'1')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'A02', N'A02 - Mã phân tích 2', N'NVQL', N'1', N'', N'1')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'A03', N'A03 - Mã phân tích 3', N'Ten chi nhanh', N'1', N'', N'1')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I01', N'I01 - Mã phân tích 1', N'MAØU SAÉC', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I02', N'I02 - Mã phân tích 2', N'Nguoàn goác', N'0', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I03', N'I03- Mã phân tích 3', N'Chuûng loại', N'0', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I04', N'I04 - Mã phân tích 4', N'Chöasöûduïng', N'0', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I05', N'I05 - Mã phân tích 5', N'Chöasöûduïng', N'0', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'O01', N'O01 - Mã phân tích 1', N'Tuyeán Ñöôøng', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'O02', N'O02 - Mã phân tích 2', N'ÑòaÑieåm/Vuøng', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'O03', N'O03 - Mã phân tích 3', N'Salesman', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'O04', N'O04 - Mã phân tích 4', N'ÑoáiTöôïngToång', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'O05', N'O05 Mã phân tích 5', N'Chöasöûduïng', N'1', N'', N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CO1', N'Phân loại 1', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CO2', N'Phân loại 2', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CO3', N'Phân loại 3', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CI1', N'Phân loại 1', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CI2', N'Phân loại 2', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'CI3', N'Phân loại 3', N'', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'A04', N'A04 - Mã phân tích 4', N'mapt4', N'0', N'', N'1')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'A05', N'A05 - Mã phân tích 5', N'ChiPhíLoaïiTröø', N'0', N'', N'1')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I06', N'I06 - Mã phân tích 6', N'ma phan tich 6', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I07', N'I07 - Mã phân tích 7', N'ma phan tich 7', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I08', N'I08 - Mã phân tích 8', N'ma phan tich 8', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I09', N'I09 - Mã phân tích 9', N'ma phan tich 9', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I10', N'I10 - Mã phân tích 10', N'ma phan tich 10', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I11', N'I11 - Mã phân tích 11', N'ma phan tich 11', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I12', N'I12 - Mã phân tích 12', N'ma phan tich 12', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I13', N'I13 - Mã phân tích 13', N'ma phan tich 13', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I14', N'I14 - Mã phân tích 14', N'ma phan tich 14', N'0', null, N'0')
GO
GO
INSERT INTO [dbo].[tb0005] ([TypeID], [SystemName], [UserName], [IsUsed], [UserNameE], [Status]) VALUES (N'I15', N'I15 - Mã phân tích 15', N'ma phan tich 15', N'0', null, N'0')
GO
GO


